ZX Spectrum Bot

A small social bot that turns ZX Spectrum programs into shareable posts, with support for Twitter and Mastodon.

ZX Spectrum Bot

Introduction

This project is a port of the Atari 8-bit bot idea to the ZX Spectrum scene. It brings together an emulator, a BASIC-to-tape workflow, and a publishing backend so that Spectrum programs can be presented as short automated social posts.

Bot Overview

The ZX Spectrum Bot is designed to run on a Linux machine, typically a Raspberry Pi or similar low-power host. It can launch a Spectrum emulator, generate or load tapes, capture the output, and publish the result through either Twitter or Mastodon.

Available in mastodon, toot code with #zxspectrumbot and it will reply with a video.

Supported directives:

  • {Z} Use Boriel zxbasic
  • {A} Use assembler language
  • {Snn} Record video for nn seconds(20-99)
  • {Bnn} Begin recording after nn seconds
  • {+} Use zxspectrum + emulation
  • {Xnn} Accelerate nn times (1-20)
  • Note: this option disables sound and posts result as gif. Use with caution.

    You can also toot a gist raw url with code. example:

             #zxspectrumbot {S32}
            10 PAPER 0:INK 6:CLS 
            20 PRINT "HELLO WORLD" 
            30 GO TO 20 
          

    Key Features

    • Ports the idea of an automated retro-computing bot to the ZX Spectrum world.
    • Supports both Twitter and Mastodon backends.
    • Uses the Fuse emulator together with Spectrum ROMs and BASIC tooling.
    • Generates TAP files with tools such as bas2tap and zmakebas.
    • Processes video output with ffmpeg and runs headlessly via Xvfb.

    Build Notes

    The project is fairly self-contained, but it does require a few dependencies and credentials to publish content properly.

    • A Twitter or Mastodon account, along with the appropriate API keys.
    • Tweepy or Mastodon.py, with the video-upload capable fork in use for richer posts.
    • Fuse emulator packages, spectrum ROMs, and utilities such as bas2tap and zmakebas.
    • ffmpeg for rendering and processing output, plus an X virtual framebuffer for headless capture.

    Useful links